#include "main/utils.h"
using namespace std;

class Solution {
public:
    double trimMean(vector<int>& arr) {
      int n = arr.size();
      int delete_num = n * 0.05;
      sort(arr.begin(), arr.end());
      int sum = 0;
      for (int i = delete_num; i < n - delete_num; ++i) {
        sum += arr[i];
      }
      double ret = double(sum) / (n - 2 * delete_num);
      return ret;
    }
};

int main() {
  vector<int> arr = {1, 2, 2, 2, 2, 2, 2, 3};
  Solution su;
  cout << su.trimMean(arr) << endl;

  return 0;
}
